﻿using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data.Mapping {
    public partial class ProductTokenMakerMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<ProductTokenMaker> {
        public ProductTokenMakerMap() {
            ToTable("mc_ProductTokenMaker", "dbo");

            HasKey(t => t.ProductActivityId);
            Property(t => t.ProductActivityId)
                .HasColumnName("ProductActivityId")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None)
                .IsRequired();

            HasRequired(t => t.ProductActivity)
                .WithOptional(t => t.ProductTokenMaker)
                .WillCascadeOnDelete(false);
        }
    }
}
